package com.jf.hb.ui;

import javax.swing.*;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-08-07
 * Time:3:37
 */
public class JFFrame extends JFrame {
    private JFHandler jfHandler;

    public JFFrame() {
        addJFHandler();
        initFrame();


        jfHandler.show();
        setVisible(true);//设置窗口可视
    }

    private void initFrame() {
        setTitle("生日快乐！");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(1280, 720);
        setLocationRelativeTo(null);
        //setLayout(null);
        setResizable(false);//设置窗口不可调整大小
        //setVisible(true);//设置窗口可视
    }

    private void addJFHandler() {
        jfHandler = new JFHandler();
        new Thread(jfHandler).start();
        this.add(jfHandler.getPanel());
    }
}
